<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$user_id = get_loggedin_userid();
//$user_id = get_input('user_id');
$facebook_ids  = explode(',', get_input('Facebook_ids'));
			  
$follow_ids = suggest_whiteboard_follows_by_facebook_ids($user_id, $facebook_ids);

$users = array();

foreach($follow_ids as $follow_id) {
    $userEntity = get_entity($follow_id->user_id);
    $users[] = userToArray($userEntity, WHITEBOARD);
}

echo json_encode(export_result(200, $users));

?>
